1. Field of the Invention
This invention relates to a system for detecting an edge of an image of an object, for example, being transported on a belt conveyor, so as to determine the shape and posture of the object or to inspect such an object.
2. Related Art
In the field of image processings, generally, a high speed processing has been desired. For example, in the inspection of an object being transported on a belt conveyor, it is required that image processings should be carried out in a real-time fashion to produce necessary control signals. For example, for processing image data obtained by scanning images IM1 and IM2 shown in FIG. 1, X and Y coordinates of points P1, P2 . . . on the edge of each of the images where the image data, produced in accordance with the scanning, varies from one state to another, for example, from the 1 state (high level) from the 0 state (low level) and vice versa, must be detected (the points P1, P2 . . . are hereinafter referred to as "level-varying points"). FIG. 2 shows a block diagram of a diagram of a system for detecting such level-varying points. This image edge-detecting system will now be described. As shown in FIG. 3, a composite video signal VE is fed from a video camera 10 to a synchronizing separator circuit 12 which separates a vertical synchronizing signal VD and a horizontal synchronizing signal HD from the composite video signal VE and outputs these separated synchronizing signals along with an image signal Vs. The image signal Vs is converted by a converter circuit 14 into a binary image signal Vb representative of the image of the object to be inspected. The prior art image-edge detection system shown in FIG. 2 comprises a 2-bit shift register 16, an exclusive OR gate 18, an inverter 20, a NAND gate 22, three counters 24, 26 and 28, and a memory 30. The level-varying points on the edge of the binary image signal Vb are detected through the shift register 16 and the exclusive OR gate 18, and a write enable signal WE of the low level is fed from the NAND gate 22 to a write terminal W of the memory 30 in synchronizing with a trailing edge of a clock pulse SC, so that X coordinate data outputted from the counter 24 and representing the X coordinate of the level-varying point is loaded onto the memory 30. At the same time, Y coordinate data outputted from the counter 26 and representing the Y coordinate of the level-varying point is loaded onto the memory 30. The address of the memory 30 into which the X and Y coordinate data are to be written are designated by the output of the address counter 28. Then, when the write enable signal WE goes high, the contents of the address counter 28 are incremented. In this manner, each time the level of the binary image signal Vs is varied, the X and Y coordinate data are written into the memory 30 as shown in FIG. 4. In other words, the coordinates of the level-varying points on the edge of the image are sequentially stored in the memory 30. Therefore, when the image processing is carried out under the control of a computer 32, the position of the edge of the image is easily obtained merely by reading the X and Y coordinate data from the memory 30.
With this prior art image-edge detecting system, as described above, the X coordinate data (column position data) and Y coordinate data (row position data) of each level-varying point on the edge of the image are stored in the memory 30. Therefore, the Y coordinate data of the varying points on a common row or horizontal scanning line are equal in value. Thus, the Y coordinate data of the same value are stored in the memory 30, so that the capacity of the memory 12 must be correspondingly increased, and in addition the time required for data processing by the computer is prolonged.